package com.atguigu.statisticsservice.controller;


import com.atguigu.commentutils.R;
import com.atguigu.statisticsservice.service.StatisticsDailyService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 * 网站统计日数据 前端控制器
 * </p>
 *
 * @author testjava
 * @since 2023-01-11
 */
@RestController
@RequestMapping("/statisticsservice/statistics-daily")
@CrossOrigin
@Api(tags = "统计数据模块")
public class StatisticsDailyController {

    @Autowired
    private StatisticsDailyService statisticsDailyService;

    //统计某一天的注册人数
    @PostMapping("registerCount/{day}")
    @ApiOperation(value = "统计某一天的注册人数")
    public R registerCount(@PathVariable String day){
        statisticsDailyService.regisCount(day);
        return R.ok();
    }

}

